package com.doge.service.admin.role;

import com.doge.bean.base.BaseData;
import com.doge.bean.base.BaseParam;
import com.doge.bean.pojo.role.Role;
import com.doge.bean.vo.role.PermissionVO;
import com.doge.exception.Param602Exception;

import java.util.List;

/**
 * @program: doge
 * @description:
 * @author: Keyu Li
 * @create: 2021-11-29 20:55
 **/

public interface RoleService {
    BaseData options();

    BaseData list(BaseParam param, String name);

    Role create(Role role) throws Param602Exception, Exception;

    void update(Role role) throws Param602Exception, Exception;

    void delete(Role role) throws Exception;

    PermissionVO getPersmissions(Integer id);

    /*
    * 临时使用一次，将 permission数据插入到 market_permission_list 中
    * */
    void insertPermissions(PermissionVO permission);

    void postPermissions(Integer roleId, List<String> permissions);
}
